/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package elevenHomework;

import java.util.Comparator;
import java.util.Scanner;
import java.util.TreeSet;

/**
 *
 * @author Administrator
 */
import java.util.Comparator;
import java.util.Scanner;
import java.util.TreeSet;

class Pai implements Comparator<Character> {

    public int compare(Character i1, Character i2) {
        return i2.compareTo(i1);
    }
}

public class ProblemB {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        TreeSet<Character> ha = new TreeSet<Character>(new Pai());
        for (int i = 0; i < s.length(); i++) {
            ha.add(s.charAt(i));
        }
        for (Character C : ha) {
            System.out.print(C);
        }
    }
}
